﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EmployeeManager.Core;
using System.Data;
using System.Data.SqlClient;

namespace EmployeeManager.DataAccess
{
   public class NhanvienAccess
    {
       dbConnection con = new dbConnection();
        #region "Variable"

        private string MANV;
        private string TENNV;
        private DateTime NGAYSINH;
        private string GIOITINH;
        private string NOISINH;
        private string DIACHIHIENTAI;
        private string QUOCTICH;
        private string TONGIAO;
        private string SoCMND;
        private DateTime NgayCapCMND;
        private string NoiCapCMND;
        private string SODIENTHOAI;
        private string EMAIL;
        #endregion
        #region "Propertion"
        public string MANV1
        {
            get { return MANV; }
            set { MANV = value; }
        }


        public string TENNV1
        {
            get { return TENNV; }
            set { TENNV = value; }
        }


        public DateTime NGAYSINH1
        {
            get { return NGAYSINH; }
            set { NGAYSINH = value; }
        }


        public string GIOITINH1
        {
            get { return GIOITINH; }
            set { GIOITINH = value; }
        }


        public string NOISINH1
        {
            get { return NOISINH; }
            set { NOISINH = value; }
        }


        public string DIACHIHIENTAI1
        {
            get { return DIACHIHIENTAI; }
            set { DIACHIHIENTAI = value; }
        }


        public string QUOCTICH1
        {
            get { return QUOCTICH; }
            set { QUOCTICH = value; }
        }


        public string TONGIAO1
        {
            get { return TONGIAO; }
            set { TONGIAO = value; }
        }


        public string SoCMND1
        {
            get { return SoCMND; }
            set { SoCMND = value; }
        }


        public DateTime NgayCapCMND1
        {
            get { return NgayCapCMND; }
            set { NgayCapCMND = value; }
        }


        public string NoiCapCMND1
        {
            get { return NoiCapCMND; }
            set { NoiCapCMND = value; }
        }


        public string SODIENTHOAI1
        {
            get { return SODIENTHOAI; }
            set { SODIENTHOAI = value; }
        }


        public string EMAIL1
        {
            get { return EMAIL; }
            set { EMAIL = value; }
        }

        #endregion
       public void themNhanvien(string str1)
       {
           
            //con.Open();
            //SqlCommand cmd = new SqlCommand("insert_NHANSU", con);
            //cmd.CommandType = CommandType.StoredProcedure;
            //cmd.Parameters.Add("@MANV", SqlDbType.Char,10).Value = txtManhanvien.Text;
            //cmd.Parameters.Add("@HODEM", SqlDbType.NVarChar).Value = txtHovaten.text;
            //cmd.Parameters.Add("@NGAYSINH", SqlDbType.DateTime).Value = txtNgaysinh.text;
            //cmd.Parameters.Add("@GIOITINH", SqlDbType.Char).Value = txtGioitinh.text;
            //cmd.Parameters.Add("@NOISINH", SqlDbType.NVarChar).Value = txtNoisinh.text;
            //cmd.Parameters.Add("@TONGIAO", SqlDbType.NVarChar).Value = txtTongiao.text;
            //cmd.Parameters.Add("@QUOCTICH", SqlDbType.NVarChar).Value = txtQuoctich.text;
            //cmd.Parameters.Add("@SoCMND", SqlDbType.Char).Value = txtSocmnd.text;
            //cmd.Parameters.Add("@NoiCapCMND", SqlDbType.NVarChar).Value = txtNoicap.text;
            //cmd.Parameters.Add("@NgayCapCMND", SqlDbType.DateTime).Value = txtNgaycap.text;
            //cmd.Parameters.Add("@DIACHIHIENTAI", SqlDbType.NVarChar).Value = txtDiachi.text;
            //cmd.Parameters.Add("@SODIENTHOAI", SqlDbType.Char).Value = txtSodienthoai.text;
            //cmd.Parameters.Add("@EMAIL", SqlDbType.Char).Value = txtEmail.text;
            //cmd.ExecuteNonQuery();
       }

    }
}
